import { createRouter, createWebHistory } from 'vue-router'
import { constantRoute } from './router.js'
const router = createRouter({
    history: createWebHistory(import.meta.env.VITE_APP_ROUTER_BASE || '/'),
    routes: constantRoute,
    scrollBehavior(to, from, savedPosition) {
      return savedPosition || { x: 0, y: 0 }
    }
  })
  
  export default router